function func167(e, t, o) {
    var n = o(53),
      i = o(173);
    i.Colours = {
      motion: {
        primary: "#4C97FF",
        secondary: "#4280D7",
        tertiary: "#3373CC"
      },
      looks: {
        primary: "#9966FF",
        secondary: "#855CD6",
        tertiary: "#774DCB"
      },
      sounds: {
        primary: "#CF63CF",
        secondary: "#C94FC9",
        tertiary: "#BD42BD"
      },
      control: {
        primary: "#FFAB19",
        secondary: "#EC9C13",
        tertiary: "#CF8B17"
      },
      event: {
        primary: "#FFBF00",
        secondary: "#E6AC00",
        tertiary: "#CC9900"
      },
      sensing: {
        primary: "#5CB1D6",
        secondary: "#47A8D1",
        tertiary: "#2E8EB8"
      },
      pen: {
        primary: "#0fBD8C",
        secondary: "#0DA57A",
        tertiary: "#0B8E69"
      },
      operators: {
        primary: "#59C059",
        secondary: "#46B946",
        tertiary: "#389438"
      },
      data: {
        primary: "#FF8C1A",
        secondary: "#FF8000",
        tertiary: "#DB6E00"
      },
      data_lists: {
        primary: "#FF661A",
        secondary: "#FF5500",
        tertiary: "#E64D00"
      },
      more: {
        primary: "#FF6680",
        secondary: "#FF4D6A",
        tertiary: "#FF3355"
      },
      text: "#575E75",
      workspace: "#F9F9F9",
      toolboxHover: "#4C97FF",
      toolboxSelected: "#e9eef2",
      toolboxText: "#575E75",
      toolbox: "#FFFFFF",
      flyout: "#F9F9F9",
      scrollbar: "#CECDCE",
      scrollbarHover: "#CECDCE",
      textField: "#FFFFFF",
      insertionMarker: "#000000",
      insertionMarkerOpacity: .2,
      dragShadowOpacity: .3,
      stackGlow: "#FFF200",
      stackGlowSize: 4,
      stackGlowOpacity: 1,
      replacementGlow: "#FFFFFF",
      replacementGlowSize: 2,
      replacementGlowOpacity: 1,
      colourPickerStroke: "#FFFFFF",
      fieldShadow: "rgba(0,0,0,0.1)",
      dropDownShadow: "rgba(0, 0, 0, .3)",
      numPadBackground: "#547AB2",
      numPadBorder: "#435F91",
      numPadActiveBackground: "#435F91",
      numPadText: "white",
      valueReportBackground: "#FFFFFF",
      valueReportBorder: "#AAAAAA"
    }, i.Colours.overrideColours = function(e) {
      if (e)
        for (var t in e)
          if (e.hasOwnProperty(t) && i.Colours.hasOwnProperty(t)) {
            var o = e[t];
            if (n.isObject(o))
              for (var a in o) o.hasOwnProperty(a) && i.Colours[t].hasOwnProperty(a) && (i.Colours[t][a] = o[a]);
            else i.Colours[t] = o
          }
    }, i.constants = {}, i.DRAG_RADIUS = 3, i.FLYOUT_DRAG_RADIUS = 10, i.SNAP_RADIUS = 48, i.CONNECTING_SNAP_RADIUS = 68, i.CURRENT_CONNECTION_PREFERENCE = 20, i.BUMP_DELAY = 0, i.COLLAPSE_CHARS = 30, i.LONGPRESS = 750, i.LINE_SCROLL_MULTIPLIER = 15, i.SOUND_LIMIT = 100, i.DRAG_STACK = !0, i.HSV_SATURATION = .45, i.HSV_VALUE = .65, i.SPRITE = {
      width: 96,
      height: 124,
      url: "sprites.png"
    }, i.SVG_NS = "http://www.w3.org/2000/svg", i.HTML_NS = "http://www.w3.org/1999/xhtml", i.INPUT_VALUE = 1, i.OUTPUT_VALUE = 2, i.NEXT_STATEMENT = 3, i.PREVIOUS_STATEMENT = 4, i.DUMMY_INPUT = 5, i.ALIGN_LEFT = -1, i.ALIGN_CENTRE = 0, i.ALIGN_RIGHT = 1, i.DRAG_NONE = 0, i.DRAG_STICKY = 1, i.DRAG_BEGIN = 1, i.DRAG_FREE = 2, i.OPPOSITE_TYPE = [], i.OPPOSITE_TYPE[i.INPUT_VALUE] = i.OUTPUT_VALUE, i.OPPOSITE_TYPE[i.OUTPUT_VALUE] = i.INPUT_VALUE, i.OPPOSITE_TYPE[i.NEXT_STATEMENT] = i.PREVIOUS_STATEMENT, i.OPPOSITE_TYPE[i.PREVIOUS_STATEMENT] = i.NEXT_STATEMENT, i.TOOLBOX_AT_TOP = 0, i.TOOLBOX_AT_BOTTOM = 1, i.TOOLBOX_AT_LEFT = 2, i.TOOLBOX_AT_RIGHT = 3, i.OUTPUT_SHAPE_HEXAGONAL = 1, i.OUTPUT_SHAPE_ROUND = 2, i.OUTPUT_SHAPE_SQUARE = 3, i.Categories = {
      motion: "motion",
      looks: "looks",
      sound: "sounds",
      pen: "pen",
      data: "data",
      dataLists: "data-lists",
      event: "events",
      control: "control",
      sensing: "sensing",
      operators: "operators",
      more: "more"
    }, i.DELETE_AREA_NONE = null, i.DELETE_AREA_TRASH = 1, i.DELETE_AREA_TOOLBOX = 2, i.VARIABLE_CATEGORY_NAME = "VARIABLE", i.PROCEDURE_CATEGORY_NAME = "PROCEDURE", i.RENAME_VARIABLE_ID = "RENAME_VARIABLE_ID", i.DELETE_VARIABLE_ID = "DELETE_VARIABLE_ID", i.NEW_BROADCAST_MESSAGE_ID = "NEW_BROADCAST_MESSAGE_ID", i.BROADCAST_MESSAGE_VARIABLE_TYPE = "broadcast_msg", i.LIST_VARIABLE_TYPE = "list", i.SCALAR_VARIABLE_TYPE = "", i.PROCEDURES_DEFINITION_BLOCK_TYPE = "procedures_definition", i.PROCEDURES_PROTOTYPE_BLOCK_TYPE = "procedures_prototype", i.PROCEDURES_CALL_BLOCK_TYPE = "procedures_call", i.StatusButtonState = {
      READY: "ready",
      NOT_READY: "not ready"
    }, i.ScratchBlocks = {}, i.ScratchBlocks.VerticalExtensions = {}, i.ScratchBlocks.VerticalExtensions.colourHelper = function(e) {
      var t = i.Colours[e];
      if (!(t && t.primary && t.secondary && t.tertiary)) throw Error('Could not find colours for category "' + e + '"');
      return function() {
        this.setColourFromRawValues_(t.primary, t.secondary, t.tertiary)
      }
    }, i.ScratchBlocks.VerticalExtensions.COLOUR_TEXTFIELD = function() {
      this.setColourFromRawValues_(i.Colours.textField, i.Colours.textField, i.Colours.textField)
    }, i.ScratchBlocks.VerticalExtensions.SHAPE_STATEMENT = function() {
      this.setInputsInline(!0), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null)
    }, i.ScratchBlocks.VerticalExtensions.SHAPE_HAT = function() {
      this.setInputsInline(!0), this.setNextStatement(!0, null)
    }, i.ScratchBlocks.VerticalExtensions.SHAPE_END = function() {
      this.setInputsInline(!0), this.setPreviousStatement(!0, null)
    }, i.ScratchBlocks.VerticalExtensions.OUTPUT_NUMBER = function() {
      this.setInputsInline(!0), this.setOutputShape(i.OUTPUT_SHAPE_ROUND), this.setOutput(!0, "Number")
    }, i.ScratchBlocks.VerticalExtensions.OUTPUT_STRING = function() {
      this.setInputsInline(!0), this.setOutputShape(i.OUTPUT_SHAPE_ROUND), this.setOutput(!0, "String")
    }, i.ScratchBlocks.VerticalExtensions.OUTPUT_BOOLEAN = function() {
      this.setInputsInline(!0), this.setOutputShape(i.OUTPUT_SHAPE_HEXAGONAL), this.setOutput(!0, "Boolean")
    }, i.ScratchBlocks.VerticalExtensions.PROCEDURE_DEF_CONTEXTMENU = {
      customContextMenu: function(e) {
        e.push(i.Procedures.makeEditOption(this));
        for (var t, o = 0; t = e[o]; o++)
          if (t.text == i.Msg.DELETE_BLOCK) {
            var n = this.getInput("custom_block");
            if (!(n && n.connection && n.connection.targetBlock())) return;
            var a = n.connection.targetBlock()
              .getProcCode(),
              r = this;
            t.callback = function() {
              i.Procedures.deleteProcedureDefCallback(a, r) || alert(i.Msg.PROCEDURE_USED)
            }
          } for (o = 0; t = e[o]; o++)
          if (t.text == i.Msg.DUPLICATE) {
            e.splice(o, 1);
            break
          }
      }
    }, i.ScratchBlocks.VerticalExtensions.PROCEDURE_CALL_CONTEXTMENU = {
      customContextMenu: function(e) {
        e.push(i.Procedures.makeEditOption(this))
      }
    }, i.ScratchBlocks.VerticalExtensions.SCRATCH_EXTENSION = function() {
      this.isScratchExtension = !0
    }, i.ScratchBlocks.VerticalExtensions.registerAll = function() {
      for (var e = "control data data_lists sounds motion looks event sensing pen operators more".split(" "), t = 0; t < e.length; t++) {
        var o = e[t];
        i.Extensions.register("colours_" + o, i.ScratchBlocks.VerticalExtensions.colourHelper(o))
      }
      i.Extensions.register("colours_textfield", i.ScratchBlocks.VerticalExtensions.COLOUR_TEXTFIELD), i.Extensions.register("shape_statement", i.ScratchBlocks.VerticalExtensions.SHAPE_STATEMENT), i.Extensions.register("shape_hat", i.ScratchBlocks.VerticalExtensions.SHAPE_HAT), i.Extensions.register("shape_end", i.ScratchBlocks.VerticalExtensions.SHAPE_END), i.Extensions.register("output_number", i.ScratchBlocks.VerticalExtensions.OUTPUT_NUMBER), i.Extensions.register("output_string", i.ScratchBlocks.VerticalExtensions.OUTPUT_STRING), i.Extensions.register("output_boolean", i.ScratchBlocks.VerticalExtensions.OUTPUT_BOOLEAN), i.Extensions.registerMixin("procedure_def_contextmenu", i.ScratchBlocks.VerticalExtensions.PROCEDURE_DEF_CONTEXTMENU), i.Extensions.registerMixin("procedure_call_contextmenu", i.ScratchBlocks.VerticalExtensions.PROCEDURE_CALL_CONTEXTMENU), i.Extensions.register("scratch_extension", i.ScratchBlocks.VerticalExtensions.SCRATCH_EXTENSION)
    }, i.ScratchBlocks.VerticalExtensions.registerAll(), i.Blocks.control = {}, i.Blocks.control_forever = {
      init: function() {
        this.jsonInit({
          id: "control_forever",
          message0: i.Msg.CONTROL_FOREVER,
          message1: "%1",
          message2: "%1",
          lastDummyAlign2: "RIGHT",
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          args2: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "repeat.svg",
            width: 24,
            height: 24,
            alt: "*",
            flip_rtl: !0
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_end"]
        })
      }
    }, i.Blocks.control_repeat = {
      init: function() {
        this.jsonInit({
          id: "control_repeat",
          message0: i.Msg.CONTROL_REPEAT,
          message1: "%1",
          message2: "%1",
          lastDummyAlign2: "RIGHT",
          args0: [{
            type: "input_value",
            name: "TIMES"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          args2: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "repeat.svg",
            width: 24,
            height: 24,
            alt: "*",
            flip_rtl: !0
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_if = {
      init: function() {
        this.jsonInit({
          type: "control_if",
          message0: i.Msg.CONTROL_IF,
          message1: "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_if_else = {
      init: function() {
        this.jsonInit({
          type: "control_if_else",
          message0: i.Msg.CONTROL_IF,
          message1: "%1",
          message2: i.Msg.CONTROL_ELSE,
          message3: "%1",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          args3: [{
            type: "input_statement",
            name: "SUBSTACK2"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_stop = {
      init: function() {
        var e = new i.FieldDropdown((function() {
          return this.sourceBlock_ && this.sourceBlock_.nextConnection && this.sourceBlock_.nextConnection.isConnected() ? [
            [i.Msg.CONTROL_STOP_OTHER, "other scripts in sprite"]
          ] : [
            [i.Msg.CONTROL_STOP_ALL, "all"],
            [i.Msg.CONTROL_STOP_THIS, "this script"],
            [i.Msg.CONTROL_STOP_OTHER, "other scripts in sprite"]
          ]
        }), (function(e) {
          i.Events.setGroup(!0);
          var t = i.Xml.domToText(this.sourceBlock_.mutationToDom());
          this.sourceBlock_.setNextStatement("other scripts in sprite" == e);
          var o = i.Xml.domToText(this.sourceBlock_.mutationToDom());
          return i.Events.fire(new i.Events.BlockChange(this.sourceBlock_, "mutation", null, t, o)), this.setValue(e), i.Events.setGroup(!1), null
        }));
        this.appendDummyInput()
          .appendField(i.Msg.CONTROL_STOP)
          .appendField(e, "STOP_OPTION"), this.setCategory(i.Categories.control), this.setColour(i.Colours.control.primary, i.Colours.control.secondary, i.Colours.control.tertiary), this.setPreviousStatement(!0)
      },
      mutationToDom: function() {
        var e = document.createElement("mutation");
        return e.setAttribute("hasnext", null != this.nextConnection), e
      },
      domToMutation: function(e) {
        e = "true" == e.getAttribute("hasnext"), this.setNextStatement(e)
      }
    }, i.Blocks.control_wait = {
      init: function() {
        this.jsonInit({
          id: "control_wait",
          message0: i.Msg.CONTROL_WAIT,
          args0: [{
            type: "input_value",
            name: "DURATION"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_wait_until = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_WAITUNTIL,
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_repeat_until = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_REPEATUNTIL,
          message1: "%1",
          message2: "%1",
          lastDummyAlign2: "RIGHT",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          args2: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "repeat.svg",
            width: 24,
            height: 24,
            alt: "*",
            flip_rtl: !0
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_while = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_WHILE,
          message1: "%1",
          message2: "%1",
          lastDummyAlign2: "RIGHT",
          args0: [{
            type: "input_value",
            name: "CONDITION",
            check: "Boolean"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          args2: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "repeat.svg",
            width: 24,
            height: 24,
            alt: "*",
            flip_rtl: !0
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_for_each = {
      init: function() {
        this.jsonInit({
          type: "control_for_each",
          message0: i.Msg.CONTROL_FOREACH,
          message1: "%1",
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_start_as_clone = {
      init: function() {
        this.jsonInit({
          id: "control_start_as_clone",
          message0: i.Msg.CONTROL_STARTASCLONE,
          args0: [],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_hat"]
        })
      }
    }, i.Blocks.control_create_clone_of_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "CLONE_OPTION",
            options: [
              [i.Msg.CONTROL_CREATECLONEOF_MYSELF, "_myself_"]
            ]
          }],
          extensions: ["colours_control", "output_string"]
        })
      }
    }, i.Blocks.control_create_clone_of = {
      init: function() {
        this.jsonInit({
          id: "control_start_as_clone",
          message0: i.Msg.CONTROL_CREATECLONEOF,
          args0: [{
            type: "input_value",
            name: "CLONE_OPTION"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_delete_this_clone = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_DELETETHISCLONE,
          args0: [],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_end"]
        })
      }
    }, i.Blocks.control_get_counter = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_COUNTER,
          category: i.Categories.control,
          extensions: ["colours_control", "output_number"]
        })
      }
    }, i.Blocks.control_incr_counter = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_INCRCOUNTER,
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_clear_counter = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_CLEARCOUNTER,
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.control_all_at_once = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.CONTROL_ALLATONCE,
          message1: "%1",
          args1: [{
            type: "input_statement",
            name: "SUBSTACK"
          }],
          category: i.Categories.control,
          extensions: ["colours_control", "shape_statement"]
        })
      }
    }, i.Blocks.data = {}, i.Constants = {}, i.Constants.Data = {}, i.Blocks.data_variable = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          lastDummyAlign0: "CENTRE",
          args0: [{
            type: "field_variable_getter",
            text: "",
            name: "VARIABLE",
            variableType: ""
          }],
          category: i.Categories.data,
          checkboxInFlyout: !0,
          extensions: ["contextMenu_getVariableBlock", "colours_data", "output_string"]
        })
      }
    }, i.Blocks.data_setvariableto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_SETVARIABLETO,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.data,
          extensions: ["colours_data", "shape_statement"]
        })
      }
    }, i.Blocks.data_changevariableby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_CHANGEVARIABLEBY,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.data,
          extensions: ["colours_data", "shape_statement"]
        })
      }
    }, i.Blocks.data_showvariable = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_SHOWVARIABLE,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }],
          previousStatement: null,
          nextStatement: null,
          category: i.Categories.data,
          colour: i.Colours.data.primary,
          colourSecondary: i.Colours.data.secondary,
          colourTertiary: i.Colours.data.tertiary
        })
      }
    }, i.Blocks.data_hidevariable = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_HIDEVARIABLE,
          args0: [{
            type: "field_variable",
            name: "VARIABLE"
          }],
          previousStatement: null,
          nextStatement: null,
          category: i.Categories.data,
          colour: i.Colours.data.primary,
          colourSecondary: i.Colours.data.secondary,
          colourTertiary: i.Colours.data.tertiary
        })
      }
    }, i.Blocks.data_listcontents = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_variable_getter",
            text: "",
            name: "LIST",
            variableType: i.LIST_VARIABLE_TYPE
          }],
          category: i.Categories.dataLists,
          extensions: ["contextMenu_getListBlock", "colours_data_lists", "output_string"],
          checkboxInFlyout: !0
        })
      }
    }, i.Blocks.data_listindexall = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_numberdropdown",
            name: "INDEX",
            value: "1",
            min: 1,
            precision: 1,
            options: [
              ["1", "1"],
              [i.Msg.DATA_INDEX_LAST, "last"],
              [i.Msg.DATA_INDEX_ALL, "all"]
            ]
          }],
          category: i.Categories.data,
          extensions: ["colours_textfield", "output_string"]
        })
      }
    }, i.Blocks.data_listindexrandom = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_numberdropdown",
            name: "INDEX",
            value: "1",
            min: 1,
            precision: 1,
            options: [
              ["1", "1"],
              [i.Msg.DATA_INDEX_LAST, "last"],
              [i.Msg.DATA_INDEX_RANDOM, "random"]
            ]
          }],
          category: i.Categories.data,
          extensions: ["colours_textfield", "output_string"]
        })
      }
    }, i.Blocks.data_addtolist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_ADDTOLIST,
          args0: [{
            type: "input_value",
            name: "ITEM"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_deleteoflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_DELETEOFLIST,
          args0: [{
            type: "input_value",
            name: "INDEX"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_deletealloflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_DELETEALLOFLIST,
          args0: [{
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_insertatlist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_INSERTATLIST,
          args0: [{
            type: "input_value",
            name: "ITEM"
          }, {
            type: "input_value",
            name: "INDEX"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_replaceitemoflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_REPLACEITEMOFLIST,
          args0: [{
            type: "input_value",
            name: "INDEX"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }, {
            type: "input_value",
            name: "ITEM"
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_itemoflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_ITEMOFLIST,
          args0: [{
            type: "input_value",
            name: "INDEX"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          output: null,
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists"],
          outputShape: i.OUTPUT_SHAPE_ROUND
        })
      }
    }, i.Blocks.data_itemnumoflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_ITEMNUMOFLIST,
          args0: [{
            type: "input_value",
            name: "ITEM"
          }, {
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          output: null,
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists"],
          outputShape: i.OUTPUT_SHAPE_ROUND
        })
      }
    }, i.Blocks.data_lengthoflist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_LENGTHOFLIST,
          args0: [{
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "output_number"]
        })
      }
    }, i.Blocks.data_listcontainsitem = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_LISTCONTAINSITEM,
          args0: [{
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }, {
            type: "input_value",
            name: "ITEM"
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "output_boolean"]
        })
      }
    }, i.Blocks.data_showlist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_SHOWLIST,
          args0: [{
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Blocks.data_hidelist = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.DATA_HIDELIST,
          args0: [{
            type: "field_variable",
            name: "LIST",
            variableTypes: [i.LIST_VARIABLE_TYPE]
          }],
          category: i.Categories.dataLists,
          extensions: ["colours_data_lists", "shape_statement"]
        })
      }
    }, i.Constants.Data.CUSTOM_CONTEXT_MENU_GET_VARIABLE_MIXIN = {
      customContextMenu: function(e) {
        if (!this.isCollapsed()) {
          var t = this.getField("VARIABLE")
            .text_;
          if (this.isInFlyout) {
            var o = {
              text: i.Msg.RENAME_VARIABLE,
              enabled: !0,
              callback: i.Constants.Data.RENAME_OPTION_CALLBACK_FACTORY(this, "VARIABLE")
            };
            t = {
              text: i.Msg.DELETE_VARIABLE.replace("%1", t),
              enabled: !0,
              callback: i.Constants.Data.DELETE_OPTION_CALLBACK_FACTORY(this, "VARIABLE")
            }, e.push(o), e.push(t)
          } else {
            (o = this.workspace.getVariablesOfType(""))
            .sort((function(e, t) {
              return i.scratchBlocksUtils.compareStrings(e.name, t.name)
            }));
            for (var n = 0; n < o.length; n++) {
              var a = o[n].name;
              if (a != t) {
                var r = {
                  enabled: !0
                };
                r.text = a, r.callback = i.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY(this, o[n].getId(), "VARIABLE"), e.push(r)
              }
            }
          }
        }
      }
    }, i.Extensions.registerMixin("contextMenu_getVariableBlock", i.Constants.Data.CUSTOM_CONTEXT_MENU_GET_VARIABLE_MIXIN), i.Constants.Data.CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN = {
      customContextMenu: function(e) {
        if (!this.isCollapsed()) {
          var t = this.getField("LIST")
            .text_;
          if (this.isInFlyout) {
            var o = {
              text: i.Msg.RENAME_LIST,
              enabled: !0,
              callback: i.Constants.Data.RENAME_OPTION_CALLBACK_FACTORY(this, "LIST")
            };
            t = {
              text: i.Msg.DELETE_LIST.replace("%1", t),
              enabled: !0,
              callback: i.Constants.Data.DELETE_OPTION_CALLBACK_FACTORY(this, "LIST")
            }, e.push(o), e.push(t)
          } else {
            (o = this.workspace.getVariablesOfType("list"))
            .sort((function(e, t) {
              return i.scratchBlocksUtils.compareStrings(e.name, t.name)
            }));
            for (var n = 0; n < o.length; n++) {
              var a = o[n].name;
              if (a != t) {
                var r = {
                  enabled: !0
                };
                r.text = a, r.callback = i.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY(this, o[n].getId(), "LIST"), e.push(r)
              }
            }
          }
        }
      }
    }, i.Extensions.registerMixin("contextMenu_getListBlock", i.Constants.Data.CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN), i.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY = function(e, t, o) {
      return function() {
        var n = e.getField(o);
        n || console.log("Tried to get a variable field on the wrong type of block."), n.setValue(t)
      }
    }, i.Constants.Data.RENAME_OPTION_CALLBACK_FACTORY = function(e, t) {
      return function() {
        var o = e.workspace,
          n = e.getField(t)
          .getVariable();
        i.Variables.renameVariable(o, n)
      }
    }, i.Constants.Data.DELETE_OPTION_CALLBACK_FACTORY = function(e, t) {
      return function() {
        var o = e.workspace,
          n = e.getField(t)
          .getVariable();
        o.deleteVariableById(n.getId())
      }
    }, i.Blocks.defaultToolbox = '<xml id="toolbox-categories" style="display: none"><category name="%{BKY_CATEGORY_MOTION}" id="motion" colour="#4C97FF" secondaryColour="#3373CC"><block type="motion_movesteps" id="motion_movesteps"><value name="STEPS"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="motion_turnright" id="motion_turnright"><value name="DEGREES"><shadow type="math_number"><field name="NUM">15</field></shadow></value></block><block type="motion_turnleft" id="motion_turnleft"><value name="DEGREES"><shadow type="math_number"><field name="NUM">15</field></shadow></value></block><block type="motion_pointindirection" id="motion_pointindirection"><value name="DIRECTION"><shadow type="math_angle"><field name="NUM">90</field></shadow></value></block><block type="motion_pointtowards" id="motion_pointtowards"><value name="TOWARDS"><shadow type="motion_pointtowards_menu"></shadow></value></block><block type="motion_gotoxy" id="motion_gotoxy"><value name="X"><shadow id="movex" type="math_number"><field name="NUM">0</field></shadow></value><value name="Y"><shadow id="movey" type="math_number"><field name="NUM">0</field></shadow></value></block><block type="motion_goto" id="motion_goto"><value name="TO"><shadow type="motion_goto_menu"></shadow></value></block><block type="motion_glidesecstoxy" id="motion_glidesecstoxy"><value name="SECS"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="X"><shadow id="glidex" type="math_number"><field name="NUM">0</field></shadow></value><value name="Y"><shadow id="glidey" type="math_number"><field name="NUM">0</field></shadow></value></block><block type="motion_glideto" id="motion_glideto"><value name="SECS"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="motion_glideto_menu"></shadow></value></block><block type="motion_changexby" id="motion_changexby"><value name="DX"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="motion_setx" id="motion_setx"><value name="X"><shadow id="setx" type="math_number"><field name="NUM">0</field></shadow></value></block><block type="motion_changeyby" id="motion_changeyby"><value name="DY"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="motion_sety" id="motion_sety"><value name="Y"><shadow id="sety" type="math_number"><field name="NUM">0</field></shadow></value></block><block type="motion_ifonedgebounce" id="motion_ifonedgebounce"></block><block type="motion_setrotationstyle" id="motion_setrotationstyle"></block><block type="motion_xposition" id="motion_xposition"></block><block type="motion_yposition" id="motion_yposition"></block><block type="motion_direction" id="motion_direction"></block></category><category name="%{BKY_CATEGORY_LOOKS}" id="looks" colour="#9966FF" secondaryColour="#774DCB"><block type="looks_show" id="looks_show"></block><block type="looks_hide" id="looks_hide"></block><block type="looks_switchcostumeto" id="looks_switchcostumeto"><value name="COSTUME"><shadow type="looks_costume"></shadow></value></block><block type="looks_nextcostume" id="looks_nextcostume"></block><block type="looks_nextbackdrop" id="looks_nextbackdrop"></block><block type="looks_switchbackdropto" id="looks_switchbackdropto"><value name="BACKDROP"><shadow type="looks_backdrops"></shadow></value></block><block type="looks_switchbackdroptoandwait" id="looks_switchbackdroptoandwait"><value name="BACKDROP"><shadow type="looks_backdrops"></shadow></value></block><block type="looks_changeeffectby" id="looks_changeeffectby"><value name="CHANGE"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="looks_seteffectto" id="looks_seteffectto"><value name="VALUE"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="looks_cleargraphiceffects" id="looks_cleargraphiceffects"></block><block type="looks_changesizeby" id="looks_changesizeby"><value name="CHANGE"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="looks_setsizeto" id="looks_setsizeto"><value name="SIZE"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="looks_gotofrontback" id="looks_gotofrontback"></block><block type="looks_goforwardbackwardlayers" id="looks_goforwardbackwardlayers"><value name="NUM"><shadow type="math_integer"><field name="NUM">1</field></shadow></value></block><block type="looks_costumenumbername" id="looks_costumenumbername"></block><block type="looks_backdropnumbername" id="looks_backdropnumbername"></block><block type="looks_size" id="looks_size"></block></category><category name="%{BKY_CATEGORY_SOUND}" id="sound" colour="#D65CD6" secondaryColour="#BD42BD"><block type="sound_play" id="sound_play"><value name="SOUND_MENU"><shadow type="sound_sounds_menu"></shadow></value></block><block type="sound_playuntildone" id="sound_playuntildone"><value name="SOUND_MENU"><shadow type="sound_sounds_menu"></shadow></value></block><block type="sound_stopallsounds" id="sound_stopallsounds"></block><block type="sound_changeeffectby" id="sound_changeeffectby"><value name="VALUE"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="sound_seteffectto" id="sound_seteffectto"><value name="VALUE"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="sound_cleareffects" id="sound_cleareffects"></block><block type="sound_changevolumeby" id="sound_changevolumeby"><value name="VOLUME"><shadow type="math_number"><field name="NUM">-10</field></shadow></value></block><block type="sound_setvolumeto" id="sound_setvolumeto"><value name="VOLUME"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="sound_volume" id="sound_volume"></block></category><category name="%{BKY_CATEGORY_EVENTS}" id="events" colour="#FFD500" secondaryColour="#CC9900"><block type="event_whenflagclicked" id="event_whenflagclicked"></block><block type="event_whenkeypressed" id="event_whenkeypressed"></block><block type="event_whenthisspriteclicked" id="event_whenthisspriteclicked"></block><block type="event_whenbackdropswitchesto" id="event_whenbackdropswitchesto"></block><block type="event_whengreaterthan" id="event_whengreaterthan"><value name="VALUE"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="event_whenbroadcastreceived" id="event_whenbroadcastreceived"></block><block type="event_broadcast" id="event_broadcast"><value name="BROADCAST_INPUT"><shadow type="event_broadcast_menu"></shadow></value></block><block type="event_broadcastandwait" id="event_broadcastandwait"><value name="BROADCAST_INPUT"><shadow type="event_broadcast_menu"></shadow></value></block></category><category name="%{BKY_CATEGORY_CONTROL}" id="control" colour="#FFAB19" secondaryColour="#CF8B17"><block type="control_wait" id="control_wait"><value name="DURATION"><shadow type="math_positive_number"><field name="NUM">1</field></shadow></value></block><block type="control_repeat" id="control_repeat"><value name="TIMES"><shadow type="math_whole_number"><field name="NUM">10</field></shadow></value></block><block type="control_forever" id="control_forever"></block><block type="control_if" id="control_if"></block><block type="control_if_else" id="control_if_else"></block><block type="control_wait_until" id="control_wait_until"></block><block type="control_repeat_until" id="control_repeat_until"></block><block type="control_stop" id="control_stop"></block><block type="control_start_as_clone" id="control_start_as_clone"></block><block type="control_create_clone_of" id="control_create_clone_of"><value name="CLONE_OPTION"><shadow type="control_create_clone_of_menu"></shadow></value></block><block type="control_delete_this_clone" id="control_delete_this_clone"></block></category><category name="%{BKY_CATEGORY_SENSING}" id="sensing" colour="#4CBFE6" secondaryColour="#2E8EB8"><block type="sensing_touchingobject" id="sensing_touchingobject"><value name="TOUCHINGOBJECTMENU"><shadow type="sensing_touchingobjectmenu"></shadow></value></block><block type="sensing_touchingcolor" id="sensing_touchingcolor"><value name="COLOR"><shadow type="colour_picker"></shadow></value></block><block type="sensing_coloristouchingcolor" id="sensing_coloristouchingcolor"><value name="COLOR"><shadow type="colour_picker"></shadow></value><value name="COLOR2"><shadow type="colour_picker"></shadow></value></block><block type="sensing_distanceto" id="sensing_distanceto"><value name="DISTANCETOMENU"><shadow type="sensing_distancetomenu"></shadow></value></block><block type="sensing_keypressed" id="sensing_keypressed"><value name="KEY_OPTION"><shadow type="sensing_keyoptions"></shadow></value></block><block type="sensing_mousedown" id="sensing_mousedown"></block><block type="sensing_mousex" id="sensing_mousex"></block><block type="sensing_mousey" id="sensing_mousey"></block><block type="sensing_setdragmode" id="sensing_setdragmode"></block><block type="sensing_loudness" id="sensing_loudness"></block><block type="sensing_timer" id="sensing_timer"></block><block type="sensing_resettimer" id="sensing_resettimer"></block><block type="sensing_of" id="sensing_of"><value name="OBJECT"><shadow type="sensing_of_object_menu"></shadow></value></block><block type="sensing_current" id="sensing_current"></block><block type="sensing_dayssince2000" id="sensing_dayssince2000"></block></category><category name="%{BKY_CATEGORY_OPERATORS}" id="operators" colour="#40BF4A" secondaryColour="#389438"><block type="operator_add" id="operator_add"><value name="NUM1"><shadow type="math_number"><field name="NUM"></field></shadow></value><value name="NUM2"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_subtract" id="operator_subtract"><value name="NUM1"><shadow type="math_number"><field name="NUM"></field></shadow></value><value name="NUM2"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_multiply" id="operator_multiply"><value name="NUM1"><shadow type="math_number"><field name="NUM"></field></shadow></value><value name="NUM2"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_divide" id="operator_divide"><value name="NUM1"><shadow type="math_number"><field name="NUM"></field></shadow></value><value name="NUM2"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_random" id="operator_random"><value name="FROM"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="operator_lt" id="operator_lt"><value name="OPERAND1"><shadow type="text"><field name="TEXT"></field></shadow></value><value name="OPERAND2"><shadow type="text"><field name="TEXT"></field></shadow></value></block><block type="operator_equals" id="operator_equals"><value name="OPERAND1"><shadow type="text"><field name="TEXT"></field></shadow></value><value name="OPERAND2"><shadow type="text"><field name="TEXT"></field></shadow></value></block><block type="operator_gt" id="operator_gt"><value name="OPERAND1"><shadow type="text"><field name="TEXT"></field></shadow></value><value name="OPERAND2"><shadow type="text"><field name="TEXT"></field></shadow></value></block><block type="operator_and" id="operator_and"></block><block type="operator_or" id="operator_or"></block><block type="operator_not" id="operator_not"></block><block type="operator_join" id="operator_join"><value name="STRING1"><shadow type="text"><field name="TEXT">hello</field></shadow></value><value name="STRING2"><shadow type="text"><field name="TEXT">world</field></shadow></value></block><block type="operator_letter_of" id="operator_letter_of"><value name="LETTER"><shadow type="math_whole_number"><field name="NUM">1</field></shadow></value><value name="STRING"><shadow type="text"><field name="TEXT">world</field></shadow></value></block><block type="operator_length" id="operator_length"><value name="STRING"><shadow type="text"><field name="TEXT">world</field></shadow></value></block><block type="operator_contains" id="operator_contains"><value name="STRING1"><shadow type="text"><field name="TEXT">hello</field></shadow></value><value name="STRING2"><shadow type="text"><field name="TEXT">world</field></shadow></value></block><block type="operator_mod" id="operator_mod"><value name="NUM1"><shadow type="math_number"><field name="NUM"></field></shadow></value><value name="NUM2"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_round" id="operator_round"><value name="NUM"><shadow type="math_number"><field name="NUM"></field></shadow></value></block><block type="operator_mathop" id="operator_mathop"><value name="NUM"><shadow type="math_number"><field name="NUM"></field></shadow></value></block></category><category name="%{BKY_CATEGORY_VARIABLES}" id="data" colour="#FF8C1A" secondaryColour="#DB6E00" custom="VARIABLE"></category><category name="%{BKY_CATEGORY_MYBLOCKS}" id="more" colour="#FF6680" secondaryColour="#FF4D6A" custom="PROCEDURE"></category><category name="Extensions" id="extensions" colour="#FF6680" secondaryColour="#FF4D6A" iconURI="../media/extensions/wedo2-block-icon.svg" showStatusButton="true"><block type="extension_pen_down" id="extension_pen_down"></block><block type="extension_music_drum" id="extension_music_drum"><value name="NUMBER"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="extension_wedo_motor" id="extension_wedo_motor"></block><block type="extension_wedo_hat" id="extension_wedo_hat"></block><block type="extension_wedo_boolean" id="extension_wedo_boolean"></block><block type="extension_wedo_tilt_reporter" id="extension_wedo_reporter"><value name="TILT"><shadow type="extension_wedo_tilt_menu"></shadow></value></block><block type="extension_music_reporter" id="extension_music_reporter"></block><block type="extension_microbit_display" id="extension_microbit_display"><value name="MATRIX"><shadow type="matrix"><field name="MATRIX">0101010101100010101000100</field></shadow></value></block><block type="extension_music_play_note" id="extension_music_play_note"><value name="NOTE"><shadow type="note"><field name="NOTE">60</field></shadow></value><value name="BEATS"><shadow type="math_number"><field name="NUM">0.25</field></shadow></value></block></category></xml>', i.Blocks.event = {}, i.Blocks.event_whentouchingobject = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_WHENTOUCHINGOBJECT,
          args0: [{
            type: "input_value",
            name: "TOUCHINGOBJECTMENU"
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_touchingobjectmenu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TOUCHINGOBJECTMENU",
            options: [
              [i.Msg.SENSING_TOUCHINGOBJECT_POINTER, "_mouse_"],
              [i.Msg.SENSING_TOUCHINGOBJECT_EDGE, "_edge_"]
            ]
          }],
          extensions: ["colours_event", "output_string"]
        })
      }
    }, i.Blocks.event_whenflagclicked = {
      init: function() {
        this.jsonInit({
          id: "event_whenflagclicked",
          message0: i.Msg.EVENT_WHENFLAGCLICKED,
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "green-flag.svg",
            width: 24,
            height: 24,
            alt: "flag"
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_whenthisspriteclicked = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_WHENTHISSPRITECLICKED,
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_whenstageclicked = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_WHENSTAGECLICKED,
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_whenbroadcastreceived = {
      init: function() {
        this.jsonInit({
          id: "event_whenbroadcastreceived",
          message0: i.Msg.EVENT_WHENBROADCASTRECEIVED,
          args0: [{
            type: "field_variable",
            name: "BROADCAST_OPTION",
            variableTypes: [i.BROADCAST_MESSAGE_VARIABLE_TYPE],
            variable: i.Msg.DEFAULT_BROADCAST_MESSAGE_NAME
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_whenbackdropswitchesto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_WHENBACKDROPSWITCHESTO,
          args0: [{
            type: "field_dropdown",
            name: "BACKDROP",
            options: [
              ["backdrop1", "BACKDROP1"]
            ]
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_whengreaterthan = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_WHENGREATERTHAN,
          args0: [{
            type: "field_dropdown",
            name: "WHENGREATERTHANMENU",
            options: [
              [i.Msg.EVENT_WHENGREATERTHAN_LOUDNESS, "LOUDNESS"],
              [i.Msg.EVENT_WHENGREATERTHAN_TIMER, "TIMER"]
            ]
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.event_broadcast_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_variable",
            name: "BROADCAST_OPTION",
            variableTypes: [i.BROADCAST_MESSAGE_VARIABLE_TYPE],
            variable: i.Msg.DEFAULT_BROADCAST_MESSAGE_NAME
          }],
          colour: i.Colours.event.secondary,
          colourSecondary: i.Colours.event.secondary,
          colourTertiary: i.Colours.event.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.event_broadcast = {
      init: function() {
        this.jsonInit({
          id: "event_broadcast",
          message0: i.Msg.EVENT_BROADCAST,
          args0: [{
            type: "input_value",
            name: "BROADCAST_INPUT"
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_statement"]
        })
      }
    }, i.Blocks.event_broadcastandwait = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.EVENT_BROADCASTANDWAIT,
          args0: [{
            type: "input_value",
            name: "BROADCAST_INPUT"
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_statement"]
        })
      }
    }, i.Blocks.event_whenkeypressed = {
      init: function() {
        this.jsonInit({
          id: "event_whenkeypressed",
          message0: i.Msg.EVENT_WHENKEYPRESSED,
          args0: [{
            type: "field_dropdown",
            name: "KEY_OPTION",
            options: [
              [i.Msg.EVENT_WHENKEYPRESSED_SPACE, "space"],
              [i.Msg.EVENT_WHENKEYPRESSED_UP, "up arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_DOWN, "down arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_RIGHT, "right arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_LEFT, "left arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_ANY, "any"],
              ["a", "a"],
              ["b", "b"],
              ["c", "c"],
              ["d", "d"],
              ["e", "e"],
              ["f", "f"],
              ["g", "g"],
              ["h", "h"],
              ["i", "i"],
              ["j", "j"],
              ["k", "k"],
              ["l", "l"],
              ["m", "m"],
              ["n", "n"],
              ["o", "o"],
              ["p", "p"],
              ["q", "q"],
              ["r", "r"],
              ["s", "s"],
              ["t", "t"],
              ["u", "u"],
              ["v", "v"],
              ["w", "w"],
              ["x", "x"],
              ["y", "y"],
              ["z", "z"],
              ["0", "0"],
              ["1", "1"],
              ["2", "2"],
              ["3", "3"],
              ["4", "4"],
              ["5", "5"],
              ["6", "6"],
              ["7", "7"],
              ["8", "8"],
              ["9", "9"]
            ]
          }],
          category: i.Categories.event,
          extensions: ["colours_event", "shape_hat"]
        })
      }
    }, i.Blocks.extensions = {}, i.Blocks.extension_pen_down = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 pen down",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/pen-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "shape_statement", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_music_drum = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 play drum %3",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/music-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }, {
            type: "input_value",
            name: "NUMBER"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "shape_statement", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_wedo_motor = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 turn a motor %3",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/wedo2-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }, {
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "rotate-right.svg",
            width: 24,
            height: 24
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "shape_statement", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_wedo_hat = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 when I am wearing a hat",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/wedo2-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "shape_hat", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_wedo_boolean = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 O RLY?",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/wedo2-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "output_boolean", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_wedo_tilt_reporter = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 tilt angle %3",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/wedo2-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }, {
            type: "input_value",
            name: "TILT"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "output_number", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_wedo_tilt_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TILT",
            options: [
              ["Any", "Any"],
              ["Whirl", "Whirl"],
              ["South", "South"],
              ["Back in time", "Back in time"]
            ]
          }],
          extensions: ["colours_more", "output_string"]
        })
      }
    }, i.Blocks.extension_music_reporter = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 hey now, you're an all-star",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/music-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }],
          category: i.Categories.more,
          extensions: ["colours_more", "output_number", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_microbit_display = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 display %3",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/microbit-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }, {
            type: "input_value",
            name: "MATRIX"
          }],
          category: i.Categories.pen,
          extensions: ["colours_pen", "shape_statement", "scratch_extension"]
        })
      }
    }, i.Blocks.extension_music_play_note = {
      init: function() {
        this.jsonInit({
          message0: "%1 %2 play note %3 for %4 beats",
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "extensions/music-block-icon.svg",
            width: 40,
            height: 40
          }, {
            type: "field_vertical_separator"
          }, {
            type: "input_value",
            name: "NOTE"
          }, {
            type: "input_value",
            name: "BEATS"
          }],
          category: i.Categories.pen,
          extensions: ["colours_pen", "shape_statement", "scratch_extension"]
        })
      }
    }, i.Blocks.looks = {}, i.Blocks.looks_sayforsecs = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SAYFORSECS,
          args0: [{
            type: "input_value",
            name: "MESSAGE"
          }, {
            type: "input_value",
            name: "SECS"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_say = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SAY,
          args0: [{
            type: "input_value",
            name: "MESSAGE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_thinkforsecs = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_THINKFORSECS,
          args0: [{
            type: "input_value",
            name: "MESSAGE"
          }, {
            type: "input_value",
            name: "SECS"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_think = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_THINK,
          args0: [{
            type: "input_value",
            name: "MESSAGE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_show = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SHOW,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_hide = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_HIDE,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_hideallsprites = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_HIDEALLSPRITES,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_changeeffectby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_CHANGEEFFECTBY,
          args0: [{
            type: "field_dropdown",
            name: "EFFECT",
            options: [
              [i.Msg.LOOKS_EFFECT_COLOR, "COLOR"],
              [i.Msg.LOOKS_EFFECT_FISHEYE, "FISHEYE"],
              [i.Msg.LOOKS_EFFECT_WHIRL, "WHIRL"],
              [i.Msg.LOOKS_EFFECT_PIXELATE, "PIXELATE"],
              [i.Msg.LOOKS_EFFECT_MOSAIC, "MOSAIC"],
              [i.Msg.LOOKS_EFFECT_BRIGHTNESS, "BRIGHTNESS"],
              [i.Msg.LOOKS_EFFECT_GHOST, "GHOST"]
            ]
          }, {
            type: "input_value",
            name: "CHANGE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_seteffectto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SETEFFECTTO,
          args0: [{
            type: "field_dropdown",
            name: "EFFECT",
            options: [
              [i.Msg.LOOKS_EFFECT_COLOR, "COLOR"],
              [i.Msg.LOOKS_EFFECT_FISHEYE, "FISHEYE"],
              [i.Msg.LOOKS_EFFECT_WHIRL, "WHIRL"],
              [i.Msg.LOOKS_EFFECT_PIXELATE, "PIXELATE"],
              [i.Msg.LOOKS_EFFECT_MOSAIC, "MOSAIC"],
              [i.Msg.LOOKS_EFFECT_BRIGHTNESS, "BRIGHTNESS"],
              [i.Msg.LOOKS_EFFECT_GHOST, "GHOST"]
            ]
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_cleargraphiceffects = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_CLEARGRAPHICEFFECTS,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_changesizeby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_CHANGESIZEBY,
          args0: [{
            type: "input_value",
            name: "CHANGE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_setsizeto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SETSIZETO,
          args0: [{
            type: "input_value",
            name: "SIZE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_size = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SIZE,
          category: i.Categories.looks,
          checkboxInFlyout: !0,
          extensions: ["colours_looks", "output_number"]
        })
      }
    }, i.Blocks.looks_changestretchby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_CHANGESTRETCHBY,
          args0: [{
            type: "input_value",
            name: "CHANGE"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_setstretchto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SETSTRETCHTO,
          args0: [{
            type: "input_value",
            name: "STRETCH"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_costume = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "COSTUME",
            options: [
              ["costume1", "COSTUME1"],
              ["costume2", "COSTUME2"]
            ]
          }],
          colour: i.Colours.looks.secondary,
          colourSecondary: i.Colours.looks.secondary,
          colourTertiary: i.Colours.looks.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.looks_switchcostumeto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SWITCHCOSTUMETO,
          args0: [{
            type: "input_value",
            name: "COSTUME"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_nextcostume = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_NEXTCOSTUME,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_switchbackdropto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SWITCHBACKDROPTO,
          args0: [{
            type: "input_value",
            name: "BACKDROP"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_backdrops = {
      init: function() {
        this.jsonInit({
          id: "looks_backdrops",
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "BACKDROP",
            options: [
              ["backdrop1", "BACKDROP1"]
            ]
          }],
          colour: i.Colours.looks.secondary,
          colourSecondary: i.Colours.looks.secondary,
          colourTertiary: i.Colours.looks.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.looks_gotofrontback = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_GOTOFRONTBACK,
          args0: [{
            type: "field_dropdown",
            name: "FRONT_BACK",
            options: [
              [i.Msg.LOOKS_GOTOFRONTBACK_FRONT, "front"],
              [i.Msg.LOOKS_GOTOFRONTBACK_BACK, "back"]
            ]
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_goforwardbackwardlayers = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_GOFORWARDBACKWARDLAYERS,
          args0: [{
            type: "field_dropdown",
            name: "FORWARD_BACKWARD",
            options: [
              [i.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_FORWARD, "forward"],
              [i.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_BACKWARD, "backward"]
            ]
          }, {
            type: "input_value",
            name: "NUM"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_backdropnumbername = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_BACKDROPNUMBERNAME,
          args0: [{
            type: "field_dropdown",
            name: "NUMBER_NAME",
            options: [
              [i.Msg.LOOKS_NUMBERNAME_NUMBER, "number"],
              [i.Msg.LOOKS_NUMBERNAME_NAME, "name"]
            ]
          }],
          category: i.Categories.looks,
          checkboxInFlyout: !0,
          extensions: ["colours_looks", "output_number"]
        })
      }
    }, i.Blocks.looks_costumenumbername = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_COSTUMENUMBERNAME,
          args0: [{
            type: "field_dropdown",
            name: "NUMBER_NAME",
            options: [
              [i.Msg.LOOKS_NUMBERNAME_NUMBER, "number"],
              [i.Msg.LOOKS_NUMBERNAME_NAME, "name"]
            ]
          }],
          category: i.Categories.looks,
          checkboxInFlyout: !0,
          extensions: ["colours_looks", "output_number"]
        })
      }
    }, i.Blocks.looks_switchbackdroptoandwait = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_SWITCHBACKDROPTOANDWAIT,
          args0: [{
            type: "input_value",
            name: "BACKDROP"
          }],
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.looks_nextbackdrop = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.LOOKS_NEXTBACKDROP_BLOCK,
          category: i.Categories.looks,
          extensions: ["colours_looks", "shape_statement"]
        })
      }
    }, i.Blocks.motion = {}, i.Blocks.motion_movesteps = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_MOVESTEPS,
          args0: [{
            type: "input_value",
            name: "STEPS"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_turnright = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_TURNRIGHT,
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "rotate-right.svg",
            width: 24,
            height: 24
          }, {
            type: "input_value",
            name: "DEGREES"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_turnleft = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_TURNLEFT,
          args0: [{
            type: "field_image",
            src: i.mainWorkspace.options.pathToMedia + "rotate-left.svg",
            width: 24,
            height: 24
          }, {
            type: "input_value",
            name: "DEGREES"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_pointindirection = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_POINTINDIRECTION,
          args0: [{
            type: "input_value",
            name: "DIRECTION"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_pointtowards_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TOWARDS",
            options: [
              [i.Msg.MOTION_POINTTOWARDS_POINTER, "_mouse_"],
              [i.Msg.MOTION_POINTTOWARDS_RANDOM, "_random_"]
            ]
          }],
          colour: i.Colours.motion.secondary,
          colourSecondary: i.Colours.motion.secondary,
          colourTertiary: i.Colours.motion.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.motion_pointtowards = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_POINTTOWARDS,
          args0: [{
            type: "input_value",
            name: "TOWARDS"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_goto_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TO",
            options: [
              [i.Msg.MOTION_GOTO_POINTER, "_mouse_"],
              [i.Msg.MOTION_GOTO_RANDOM, "_random_"]
            ]
          }],
          colour: i.Colours.motion.secondary,
          colourSecondary: i.Colours.motion.secondary,
          colourTertiary: i.Colours.motion.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.motion_gotoxy = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_GOTOXY,
          args0: [{
            type: "input_value",
            name: "X"
          }, {
            type: "input_value",
            name: "Y"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_goto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_GOTO,
          args0: [{
            type: "input_value",
            name: "TO"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_glidesecstoxy = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_GLIDESECSTOXY,
          args0: [{
            type: "input_value",
            name: "SECS"
          }, {
            type: "input_value",
            name: "X"
          }, {
            type: "input_value",
            name: "Y"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_glideto_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TO",
            options: [
              [i.Msg.MOTION_GLIDETO_POINTER, "_mouse_"],
              [i.Msg.MOTION_GLIDETO_RANDOM, "_random_"]
            ]
          }],
          colour: i.Colours.motion.secondary,
          colourSecondary: i.Colours.motion.secondary,
          colourTertiary: i.Colours.motion.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.motion_glideto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_GLIDETO,
          args0: [{
            type: "input_value",
            name: "SECS"
          }, {
            type: "input_value",
            name: "TO"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_changexby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_CHANGEXBY,
          args0: [{
            type: "input_value",
            name: "DX"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_setx = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_SETX,
          args0: [{
            type: "input_value",
            name: "X"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_changeyby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_CHANGEYBY,
          args0: [{
            type: "input_value",
            name: "DY"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_sety = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_SETY,
          args0: [{
            type: "input_value",
            name: "Y"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_ifonedgebounce = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_IFONEDGEBOUNCE,
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_setrotationstyle = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_SETROTATIONSTYLE,
          args0: [{
            type: "field_dropdown",
            name: "STYLE",
            options: [
              [i.Msg.MOTION_SETROTATIONSTYLE_LEFTRIGHT, "left-right"],
              [i.Msg.MOTION_SETROTATIONSTYLE_DONTROTATE, "don't rotate"],
              [i.Msg.MOTION_SETROTATIONSTYLE_ALLAROUND, "all around"]
            ]
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_xposition = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_XPOSITION,
          category: i.Categories.motion,
          checkboxInFlyout: !0,
          extensions: ["colours_motion", "output_number"]
        })
      }
    }, i.Blocks.motion_yposition = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_YPOSITION,
          category: i.Categories.motion,
          checkboxInFlyout: !0,
          extensions: ["colours_motion", "output_number"]
        })
      }
    }, i.Blocks.motion_direction = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_DIRECTION,
          category: i.Categories.motion,
          checkboxInFlyout: !0,
          extensions: ["colours_motion", "output_number"]
        })
      }
    }, i.Blocks.motion_scroll_right = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_SCROLLRIGHT,
          args0: [{
            type: "input_value",
            name: "DISTANCE"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_scroll_up = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_SCROLLUP,
          args0: [{
            type: "input_value",
            name: "DISTANCE"
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_align_scene = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_ALIGNSCENE,
          args0: [{
            type: "field_dropdown",
            name: "ALIGNMENT",
            options: [
              [i.Msg.MOTION_ALIGNSCENE_BOTTOMLEFT, "bottom-left"],
              [i.Msg.MOTION_ALIGNSCENE_BOTTOMRIGHT, "bottom-right"],
              [i.Msg.MOTION_ALIGNSCENE_MIDDLE, "middle"],
              [i.Msg.MOTION_ALIGNSCENE_TOPLEFT, "top-left"],
              [i.Msg.MOTION_ALIGNSCENE_TOPRIGHT, "top-right"]
            ]
          }],
          category: i.Categories.motion,
          extensions: ["colours_motion", "shape_statement"]
        })
      }
    }, i.Blocks.motion_xscroll = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_XSCROLL,
          category: i.Categories.motion,
          extensions: ["colours_motion", "output_number"]
        })
      }
    }, i.Blocks.motion_yscroll = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.MOTION_YSCROLL,
          category: i.Categories.motion,
          extensions: ["colours_motion", "output_number"]
        })
      }
    }, i.Blocks.operators = {}, i.Blocks.operator_add = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_ADD,
          args0: [{
            type: "input_value",
            name: "NUM1"
          }, {
            type: "input_value",
            name: "NUM2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_subtract = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_SUBTRACT,
          args0: [{
            type: "input_value",
            name: "NUM1"
          }, {
            type: "input_value",
            name: "NUM2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_multiply = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_MULTIPLY,
          args0: [{
            type: "input_value",
            name: "NUM1"
          }, {
            type: "input_value",
            name: "NUM2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_divide = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_DIVIDE,
          args0: [{
            type: "input_value",
            name: "NUM1"
          }, {
            type: "input_value",
            name: "NUM2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_random = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_RANDOM,
          args0: [{
            type: "input_value",
            name: "FROM"
          }, {
            type: "input_value",
            name: "TO"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_lt = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_LT,
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_equals = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_EQUALS,
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_gt = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_GT,
          args0: [{
            type: "input_value",
            name: "OPERAND1"
          }, {
            type: "input_value",
            name: "OPERAND2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_and = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_AND,
          args0: [{
            type: "input_value",
            name: "OPERAND1",
            check: "Boolean"
          }, {
            type: "input_value",
            name: "OPERAND2",
            check: "Boolean"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_or = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_OR,
          args0: [{
            type: "input_value",
            name: "OPERAND1",
            check: "Boolean"
          }, {
            type: "input_value",
            name: "OPERAND2",
            check: "Boolean"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_not = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_NOT,
          args0: [{
            type: "input_value",
            name: "OPERAND",
            check: "Boolean"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_join = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_JOIN,
          args0: [{
            type: "input_value",
            name: "STRING1"
          }, {
            type: "input_value",
            name: "STRING2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_string"]
        })
      }
    }, i.Blocks.operator_letter_of = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_LETTEROF,
          args0: [{
            type: "input_value",
            name: "LETTER"
          }, {
            type: "input_value",
            name: "STRING"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_string"]
        })
      }
    }, i.Blocks.operator_length = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_LENGTH,
          args0: [{
            type: "input_value",
            name: "STRING"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_string"]
        })
      }
    }, i.Blocks.operator_contains = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_CONTAINS,
          args0: [{
            type: "input_value",
            name: "STRING1"
          }, {
            type: "input_value",
            name: "STRING2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_boolean"]
        })
      }
    }, i.Blocks.operator_mod = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_MOD,
          args0: [{
            type: "input_value",
            name: "NUM1"
          }, {
            type: "input_value",
            name: "NUM2"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_round = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_ROUND,
          args0: [{
            type: "input_value",
            name: "NUM"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.Blocks.operator_mathop = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.OPERATORS_MATHOP,
          args0: [{
            type: "field_dropdown",
            name: "OPERATOR",
            options: [
              [i.Msg.OPERATORS_MATHOP_ABS, "abs"],
              [i.Msg.OPERATORS_MATHOP_FLOOR, "floor"],
              [i.Msg.OPERATORS_MATHOP_CEILING, "ceiling"],
              [i.Msg.OPERATORS_MATHOP_SQRT, "sqrt"],
              [i.Msg.OPERATORS_MATHOP_SIN, "sin"],
              [i.Msg.OPERATORS_MATHOP_COS, "cos"],
              [i.Msg.OPERATORS_MATHOP_TAN, "tan"],
              [i.Msg.OPERATORS_MATHOP_ASIN, "asin"],
              [i.Msg.OPERATORS_MATHOP_ACOS, "acos"],
              [i.Msg.OPERATORS_MATHOP_ATAN, "atan"],
              [i.Msg.OPERATORS_MATHOP_LN, "ln"],
              [i.Msg.OPERATORS_MATHOP_LOG, "log"],
              [i.Msg.OPERATORS_MATHOP_EEXP, "e ^"],
              [i.Msg.OPERATORS_MATHOP_10EXP, "10 ^"]
            ]
          }, {
            type: "input_value",
            name: "NUM"
          }],
          category: i.Categories.operators,
          extensions: ["colours_operators", "output_number"]
        })
      }
    }, i.ScratchBlocks.ProcedureUtils = {}, i.ScratchBlocks.ProcedureUtils.callerMutationToDom = function() {
      var e = document.createElement("mutation");
      return e.setAttribute("proccode", this.procCode_), e.setAttribute("argumentids", JSON.stringify(this.argumentIds_)), e.setAttribute("warp", JSON.stringify(this.warp_)), e
    }, i.ScratchBlocks.ProcedureUtils.callerDomToMutation = function(e) {
      this.procCode_ = e.getAttribute("proccode"), this.generateShadows_ = JSON.parse(e.getAttribute("generateshadows")), this.argumentIds_ = JSON.parse(e.getAttribute("argumentids")), this.warp_ = JSON.parse(e.getAttribute("warp")), this.updateDisplay_()
    }, i.ScratchBlocks.ProcedureUtils.definitionMutationToDom = function(e) {
      var t = document.createElement("mutation");
      return e && t.setAttribute("generateshadows", !0), t.setAttribute("proccode", this.procCode_), t.setAttribute("argumentids", JSON.stringify(this.argumentIds_)), t.setAttribute("argumentnames", JSON.stringify(this.displayNames_)), t.setAttribute("argumentdefaults", JSON.stringify(this.argumentDefaults_)), t.setAttribute("warp", JSON.stringify(this.warp_)), t
    }, i.ScratchBlocks.ProcedureUtils.definitionDomToMutation = function(e) {
      this.procCode_ = e.getAttribute("proccode"), this.warp_ = JSON.parse(e.getAttribute("warp"));
      var t = this.argumentIds_,
        o = this.displayNames_;
      this.argumentIds_ = JSON.parse(e.getAttribute("argumentids")), this.displayNames_ = JSON.parse(e.getAttribute("argumentnames")), this.argumentDefaults_ = JSON.parse(e.getAttribute("argumentdefaults")), this.updateDisplay_(), this.updateArgumentReporterNames_ && this.updateArgumentReporterNames_(t, o)
    }, i.ScratchBlocks.ProcedureUtils.getProcCode = function() {
      return this.procCode_
    }, i.ScratchBlocks.ProcedureUtils.updateDisplay_ = function() {
      var e = this.rendered;
      this.rendered = !1;
      var t = this.disconnectOldBlocks_();
      this.removeAllInputs_(), this.createAllInputs_(t), this.deleteShadows_(t), (this.rendered = e) && !this.isInsertionMarker() && (this.initSvg(), this.render())
    }, i.ScratchBlocks.ProcedureUtils.disconnectOldBlocks_ = function() {
      for (var e, t = {}, o = 0; e = this.inputList[o]; o++)
        if (e.connection) {
          var n = e.connection.targetBlock(),
            i = {
              shadow: e.connection.getShadowDom(),
              block: n
            };
          t[e.name] = i, e.connection.setShadowDom(null), n && e.connection.disconnect()
        } return t
    }, i.ScratchBlocks.ProcedureUtils.removeAllInputs_ = function() {
      for (var e, t = 0; e = this.inputList[t]; t++) e.dispose();
      this.inputList = []
    }, i.ScratchBlocks.ProcedureUtils.createAllInputs_ = function(e) {
      var t = this.procCode_.split(/(?=[^\\]%[nbs])/);
      t = t.map((function(e) {
        return e.trim()
      }));
      for (var o, n = 0, i = 0; o = t[i]; i++) {
        if ("%" == o.substring(0, 1)) {
          var a = o.substring(1, 2);
          if ("n" != a && "b" != a && "s" != a) throw Error("Found an custom procedure with an invalid type: " + a);
          o = o.substring(2)
            .trim();
          var r = this.argumentIds_[n],
            l = this.appendValueInput(r);
          "b" == a && l.setCheck("Boolean"), this.populateArgument_(a, n, e, r, l), n++
        } else o = o.trim();
        this.addProcedureLabel_(o.replace(/\\%/, "%"))
      }
    }, i.ScratchBlocks.ProcedureUtils.deleteShadows_ = function(e) {
      if (e)
        for (var t in e) {
          var o = e[t];
          o && (o = o.block) && o.isShadow() && (o.dispose(), e[t] = null)
        }
    }, i.ScratchBlocks.ProcedureUtils.addLabelField_ = function(e) {
      this.appendDummyInput()
        .appendField(e)
    }, i.ScratchBlocks.ProcedureUtils.addLabelEditor_ = function(e) {
      e && this.appendDummyInput(i.utils.genUid())
        .appendField(new i.FieldTextInputRemovable(e))
    }, i.ScratchBlocks.ProcedureUtils.buildShadowDom_ = function(e) {
      var t = n.dom.createDom("shadow");
      if ("n" == e) {
        var o = "math_number";
        e = "NUM";
        var i = "1"
      } else o = "text", e = "TEXT", i = "";
      return t.setAttribute("type", o), (o = n.dom.createDom("field", null, i))
        .setAttribute("name", e), t.appendChild(o), t
    }, i.ScratchBlocks.ProcedureUtils.attachShadow_ = function(e, t) {
      if ("n" == t || "s" == t) {
        var o = "n" == t ? "math_number" : "text";
        i.Events.disable();
        try {
          var n = this.workspace.newBlock(o);
          "n" == t ? n.setFieldValue("1", "NUM") : n.setFieldValue("", "TEXT"), n.setShadow(!0), this.isInsertionMarker() || (n.initSvg(), n.render(!1))
        } finally {
          i.Events.enable()
        }
        i.Events.isEnabled() && i.Events.fire(new i.Events.BlockCreate(n)), n.outputConnection.connect(e.connection)
      }
    }, i.ScratchBlocks.ProcedureUtils.createArgumentReporter_ = function(e, t) {
      e = "n" == e || "s" == e ? "argument_reporter_string_number" : "argument_reporter_boolean", i.Events.disable();
      try {
        var o = this.workspace.newBlock(e);
        o.setShadow(!0), o.setFieldValue(t, "VALUE"), this.isInsertionMarker() || (o.initSvg(), o.render(!1))
      } finally {
        i.Events.enable()
      }
      return i.Events.isEnabled() && i.Events.fire(new i.Events.BlockCreate(o)), o
    }, i.ScratchBlocks.ProcedureUtils.populateArgumentOnCaller_ = function(e, t, o, n, i) {
      var a = t = null;
      o && n in o && (t = (n = o[n])
        .block, a = n.shadow), o && t ? (o[i.name] = null, t.outputConnection.connect(i.connection), "b" != e && this.generateShadows_ && (e = a || this.buildShadowDom_(e), console.log("setting shadow dom: " + e), i.connection.setShadowDom(e))) : this.generateShadows_ && this.attachShadow_(i, e)
    }, i.ScratchBlocks.ProcedureUtils.populateArgumentOnPrototype_ = function(e, t, o, n, a) {
      var r = null;
      o && n in o && (r = o[n].block), n = i.ScratchBlocks.ProcedureUtils.checkOldTypeMatches_(r, e), t = this.displayNames_[t], o && r && n ? ((e = r)
        .setFieldValue(t, "VALUE"), o[a.name] = null) : e = this.createArgumentReporter_(e, t), a.connection.connect(e.outputConnection)
    }, i.ScratchBlocks.ProcedureUtils.populateArgumentOnDeclaration_ = function(e, t, o, n, a) {
      var r = null;
      o && n in o && (r = o[n].block), n = i.ScratchBlocks.ProcedureUtils.checkOldTypeMatches_(r, e), t = this.displayNames_[t], r && n ? (e = r, r.setFieldValue(t, "TEXT"), o[a.name] = null) : e = this.createArgumentEditor_(e, t), a.connection.connect(e.outputConnection)
    }, i.ScratchBlocks.ProcedureUtils.checkOldTypeMatches_ = function(e, t) {
      return !!e && (("n" == t || "s" == t) && "argument_reporter_string_number" == e.type || "b" == t && "argument_reporter_boolean" == e.type)
    }, i.ScratchBlocks.ProcedureUtils.createArgumentEditor_ = function(e, t) {
      i.Events.disable();
      try {
        var o = "n" == e || "s" == e ? this.workspace.newBlock("argument_editor_string_number") : this.workspace.newBlock("argument_editor_boolean");
        o.setFieldValue(t, "TEXT"), o.setShadow(!0), this.isInsertionMarker() || (o.initSvg(), o.render(!1))
      } finally {
        i.Events.enable()
      }
      return i.Events.isEnabled() && i.Events.fire(new i.Events.BlockCreate(o)), o
    }, i.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ = function() {
      this.procCode_ = "", this.displayNames_ = [], this.argumentIds_ = [];
      for (var e = 0; e < this.inputList.length; e++) {
        0 != e && (this.procCode_ += " ");
        var t = this.inputList[e];
        if (t.type == i.DUMMY_INPUT) this.procCode_ += t.fieldRow[0].getValue();
        else {
          if (t.type != i.INPUT_VALUE) throw Error("Unexpected input type on a procedure mutator root: " + t.type);
          var o = t.connection.targetBlock();
          this.displayNames_.push(o.getFieldValue("TEXT")), this.argumentIds_.push(t.name), this.procCode_ = "argument_editor_boolean" == o.type ? this.procCode_ + "%b" : this.procCode_ + "%s"
        }
      }
    }, i.ScratchBlocks.ProcedureUtils.focusLastEditor_ = function() {
      if (0 < this.inputList.length) {
        var e = this.inputList[this.inputList.length - 1];
        e.type == i.DUMMY_INPUT ? e.fieldRow[0].showEditor_() : e.type == i.INPUT_VALUE && e.connection.targetBlock()
          .getField("TEXT")
          .showEditor_()
      }
    }, i.ScratchBlocks.ProcedureUtils.addLabelExternal = function() {
      i.WidgetDiv.hide(!0), this.procCode_ += " label text", this.updateDisplay_(), this.focusLastEditor_()
    }, i.ScratchBlocks.ProcedureUtils.addBooleanExternal = function() {
      i.WidgetDiv.hide(!0), this.procCode_ += " %b", this.displayNames_.push("boolean"), this.argumentIds_.push(i.utils.genUid()), this.argumentDefaults_.push("false"), this.updateDisplay_(), this.focusLastEditor_()
    }, i.ScratchBlocks.ProcedureUtils.addStringNumberExternal = function() {
      i.WidgetDiv.hide(!0), this.procCode_ += " %s", this.displayNames_.push("number or text"), this.argumentIds_.push(i.utils.genUid()), this.argumentDefaults_.push(""), this.updateDisplay_(), this.focusLastEditor_()
    }, i.ScratchBlocks.ProcedureUtils.getWarp = function() {
      return this.warp_
    }, i.ScratchBlocks.ProcedureUtils.setWarp = function(e) {
      this.warp_ = e
    }, i.ScratchBlocks.ProcedureUtils.removeFieldCallback = function(e) {
      if (1 !== this.inputList.length) {
        for (var t = null, o = 0; o < this.inputList.length; o++) {
          var n = this.inputList[o];
          if (n.connection) n.connection.targetBlock()
            .getField(e.name) == e && (t = n.name);
          else
            for (var a = 0; a < n.fieldRow.length; a++) n.fieldRow[a] == e && (t = n.name)
        }
        t && (i.WidgetDiv.hide(!0), this.removeInput(t), this.onChangeFn(), this.updateDisplay_())
      }
    }, i.ScratchBlocks.ProcedureUtils.removeArgumentCallback_ = function(e) {
      this.parentBlock_ && this.parentBlock_.removeFieldCallback && this.parentBlock_.removeFieldCallback(e)
    }, i.ScratchBlocks.ProcedureUtils.updateArgumentReporterNames_ = function(e, t) {
      var o = [],
        n = [],
        i = this.getParent();
      if (i) {
        for (var a = i.getDescendants(!1), r = 0; r < a.length; r++) "argument_reporter_string_number" !== (i = a[r])
          .type && "argument_reporter_boolean" !== i.type || i.isShadow() || n.push(i);
        for (r = 0; i = this.argumentIds_[r]; r++)
          if (-1 != (i = e.indexOf(i))) {
            var l = t[i];
            l != this.displayNames_[r] && o.push({
              newName: this.displayNames_[r],
              blocks: n.filter((function(e) {
                return e.getFieldValue("VALUE") == l
              }))
            })
          } for (e = 0; t = o[e]; e++)
          for (n = 0; i = t.blocks[n]; n++) i.setFieldValue(t.newName, "VALUE")
      }
    }, i.Blocks.procedures_definition = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.PROCEDURES_DEFINITION,
          args0: [{
            type: "input_statement",
            name: "custom_block"
          }],
          extensions: ["colours_more", "shape_hat", "procedure_def_contextmenu"]
        })
      }
    }, i.Blocks.procedures_call = {
      init: function() {
        this.jsonInit({
          extensions: ["colours_more", "shape_statement", "procedure_call_contextmenu"]
        }), this.procCode_ = "", this.argumentIds_ = [], this.warp_ = !1
      },
      getProcCode: i.ScratchBlocks.ProcedureUtils.getProcCode,
      removeAllInputs_: i.ScratchBlocks.ProcedureUtils.removeAllInputs_,
      disconnectOldBlocks_: i.ScratchBlocks.ProcedureUtils.disconnectOldBlocks_,
      deleteShadows_: i.ScratchBlocks.ProcedureUtils.deleteShadows_,
      createAllInputs_: i.ScratchBlocks.ProcedureUtils.createAllInputs_,
      updateDisplay_: i.ScratchBlocks.ProcedureUtils.updateDisplay_,
      mutationToDom: i.ScratchBlocks.ProcedureUtils.callerMutationToDom,
      domToMutation: i.ScratchBlocks.ProcedureUtils.callerDomToMutation,
      populateArgument_: i.ScratchBlocks.ProcedureUtils.populateArgumentOnCaller_,
      addProcedureLabel_: i.ScratchBlocks.ProcedureUtils.addLabelField_,
      attachShadow_: i.ScratchBlocks.ProcedureUtils.attachShadow_,
      buildShadowDom_: i.ScratchBlocks.ProcedureUtils.buildShadowDom_
    }, i.Blocks.procedures_prototype = {
      init: function() {
        this.jsonInit({
          extensions: ["colours_more", "shape_statement"]
        }), this.procCode_ = "", this.displayNames_ = [], this.argumentIds_ = [], this.argumentDefaults_ = [], this.warp_ = !1
      },
      getProcCode: i.ScratchBlocks.ProcedureUtils.getProcCode,
      removeAllInputs_: i.ScratchBlocks.ProcedureUtils.removeAllInputs_,
      disconnectOldBlocks_: i.ScratchBlocks.ProcedureUtils.disconnectOldBlocks_,
      deleteShadows_: i.ScratchBlocks.ProcedureUtils.deleteShadows_,
      createAllInputs_: i.ScratchBlocks.ProcedureUtils.createAllInputs_,
      updateDisplay_: i.ScratchBlocks.ProcedureUtils.updateDisplay_,
      mutationToDom: i.ScratchBlocks.ProcedureUtils.definitionMutationToDom,
      domToMutation: i.ScratchBlocks.ProcedureUtils.definitionDomToMutation,
      populateArgument_: i.ScratchBlocks.ProcedureUtils.populateArgumentOnPrototype_,
      addProcedureLabel_: i.ScratchBlocks.ProcedureUtils.addLabelField_,
      createArgumentReporter_: i.ScratchBlocks.ProcedureUtils.createArgumentReporter_,
      updateArgumentReporterNames_: i.ScratchBlocks.ProcedureUtils.updateArgumentReporterNames_
    }, i.Blocks.procedures_declaration = {
      init: function() {
        this.jsonInit({
          extensions: ["colours_more", "shape_statement"]
        }), this.procCode_ = "", this.displayNames_ = [], this.argumentIds_ = [], this.argumentDefaults_ = [], this.warp_ = !1
      },
      getProcCode: i.ScratchBlocks.ProcedureUtils.getProcCode,
      removeAllInputs_: i.ScratchBlocks.ProcedureUtils.removeAllInputs_,
      disconnectOldBlocks_: i.ScratchBlocks.ProcedureUtils.disconnectOldBlocks_,
      deleteShadows_: i.ScratchBlocks.ProcedureUtils.deleteShadows_,
      createAllInputs_: i.ScratchBlocks.ProcedureUtils.createAllInputs_,
      updateDisplay_: i.ScratchBlocks.ProcedureUtils.updateDisplay_,
      mutationToDom: i.ScratchBlocks.ProcedureUtils.definitionMutationToDom,
      domToMutation: i.ScratchBlocks.ProcedureUtils.definitionDomToMutation,
      populateArgument_: i.ScratchBlocks.ProcedureUtils.populateArgumentOnDeclaration_,
      addProcedureLabel_: i.ScratchBlocks.ProcedureUtils.addLabelEditor_,
      removeFieldCallback: i.ScratchBlocks.ProcedureUtils.removeFieldCallback,
      createArgumentEditor_: i.ScratchBlocks.ProcedureUtils.createArgumentEditor_,
      focusLastEditor_: i.ScratchBlocks.ProcedureUtils.focusLastEditor_,
      getWarp: i.ScratchBlocks.ProcedureUtils.getWarp,
      setWarp: i.ScratchBlocks.ProcedureUtils.setWarp,
      addLabelExternal: i.ScratchBlocks.ProcedureUtils.addLabelExternal,
      addBooleanExternal: i.ScratchBlocks.ProcedureUtils.addBooleanExternal,
      addStringNumberExternal: i.ScratchBlocks.ProcedureUtils.addStringNumberExternal,
      onChangeFn: i.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_
    }, i.Blocks.argument_reporter_boolean = {
      init: function() {
        this.jsonInit({
          message0: " %1",
          args0: [{
            type: "field_label_serializable",
            name: "VALUE",
            text: ""
          }],
          extensions: ["colours_more", "output_boolean"]
        })
      }
    }, i.Blocks.argument_reporter_string_number = {
      init: function() {
        this.jsonInit({
          message0: " %1",
          args0: [{
            type: "field_label_serializable",
            name: "VALUE",
            text: ""
          }],
          extensions: ["colours_more", "output_number", "output_string"]
        })
      }
    }, i.Blocks.argument_editor_boolean = {
      init: function() {
        this.jsonInit({
          message0: " %1",
          args0: [{
            type: "field_input_removable",
            name: "TEXT",
            text: "foo"
          }],
          colour: i.Colours.textField,
          colourSecondary: i.Colours.textField,
          colourTertiary: i.Colours.textField,
          extensions: ["output_boolean"]
        })
      },
      removeFieldCallback: i.ScratchBlocks.ProcedureUtils.removeArgumentCallback_
    }, i.Blocks.argument_editor_string_number = {
      init: function() {
        this.jsonInit({
          message0: " %1",
          args0: [{
            type: "field_input_removable",
            name: "TEXT",
            text: "foo"
          }],
          colour: i.Colours.textField,
          colourSecondary: i.Colours.textField,
          colourTertiary: i.Colours.textField,
          extensions: ["output_number", "output_string"]
        })
      },
      removeFieldCallback: i.ScratchBlocks.ProcedureUtils.removeArgumentCallback_
    }, i.Blocks.sensing = {}, i.Blocks.sensing_touchingobject = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_TOUCHINGOBJECT,
          args0: [{
            type: "input_value",
            name: "TOUCHINGOBJECTMENU"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_touchingobjectmenu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "TOUCHINGOBJECTMENU",
            options: [
              [i.Msg.SENSING_TOUCHINGOBJECT_POINTER, "_mouse_"],
              [i.Msg.SENSING_TOUCHINGOBJECT_EDGE, "_edge_"]
            ]
          }],
          extensions: ["colours_sensing", "output_string"]
        })
      }
    }, i.Blocks.sensing_touchingcolor = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_TOUCHINGCOLOR,
          args0: [{
            type: "input_value",
            name: "COLOR"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_coloristouchingcolor = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_COLORISTOUCHINGCOLOR,
          args0: [{
            type: "input_value",
            name: "COLOR"
          }, {
            type: "input_value",
            name: "COLOR2"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_distanceto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_DISTANCETO,
          args0: [{
            type: "input_value",
            name: "DISTANCETOMENU"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_distancetomenu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "DISTANCETOMENU",
            options: [
              [i.Msg.SENSING_DISTANCETO_POINTER, "_mouse_"]
            ]
          }],
          extensions: ["colours_sensing", "output_string"]
        })
      }
    }, i.Blocks.sensing_askandwait = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_ASKANDWAIT,
          args0: [{
            type: "input_value",
            name: "QUESTION"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "shape_statement"]
        })
      }
    }, i.Blocks.sensing_answer = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_ANSWER,
          category: i.Categories.sensing,
          checkboxInFlyout: !0,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_keypressed = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_KEYPRESSED,
          args0: [{
            type: "input_value",
            name: "KEY_OPTION"
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_keyoptions = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "KEY_OPTION",
            options: [
              [i.Msg.EVENT_WHENKEYPRESSED_SPACE, "space"],
              [i.Msg.EVENT_WHENKEYPRESSED_UP, "up arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_DOWN, "down arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_RIGHT, "right arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_LEFT, "left arrow"],
              [i.Msg.EVENT_WHENKEYPRESSED_ANY, "any"],
              ["a", "a"],
              ["b", "b"],
              ["c", "c"],
              ["d", "d"],
              ["e", "e"],
              ["f", "f"],
              ["g", "g"],
              ["h", "h"],
              ["i", "i"],
              ["j", "j"],
              ["k", "k"],
              ["l", "l"],
              ["m", "m"],
              ["n", "n"],
              ["o", "o"],
              ["p", "p"],
              ["q", "q"],
              ["r", "r"],
              ["s", "s"],
              ["t", "t"],
              ["u", "u"],
              ["v", "v"],
              ["w", "w"],
              ["x", "x"],
              ["y", "y"],
              ["z", "z"],
              ["0", "0"],
              ["1", "1"],
              ["2", "2"],
              ["3", "3"],
              ["4", "4"],
              ["5", "5"],
              ["6", "6"],
              ["7", "7"],
              ["8", "8"],
              ["9", "9"]
            ]
          }],
          extensions: ["colours_sensing", "output_string"]
        })
      }
    }, i.Blocks.sensing_mousedown = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_MOUSEDOWN,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_mousex = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_MOUSEX,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_mousey = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_MOUSEY,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_setdragmode = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_SETDRAGMODE,
          args0: [{
            type: "field_dropdown",
            name: "DRAG_MODE",
            options: [
              [i.Msg.SENSING_SETDRAGMODE_DRAGGABLE, "draggable"],
              [i.Msg.SENSING_SETDRAGMODE_NOTDRAGGABLE, "not draggable"]
            ]
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "shape_statement"]
        })
      }
    }, i.Blocks.sensing_loudness = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_LOUDNESS,
          category: i.Categories.sensing,
          checkboxInFlyout: !0,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_loud = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_LOUD,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_boolean"]
        })
      }
    }, i.Blocks.sensing_timer = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_TIMER,
          category: i.Categories.sensing,
          checkboxInFlyout: !0,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_resettimer = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_RESETTIMER,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "shape_statement"]
        })
      }
    }, i.Blocks.sensing_of_object_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "OBJECT",
            options: [
              ["Sprite1", "Sprite1"],
              ["Stage", "_stage_"]
            ]
          }],
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_string"]
        })
      }
    }, i.Blocks.sensing_of = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_OF,
          args0: [{
            type: "field_dropdown",
            name: "PROPERTY",
            options: [
              [i.Msg.SENSING_OF_XPOSITION, "x position"],
              [i.Msg.SENSING_OF_YPOSITION, "y position"],
              [i.Msg.SENSING_OF_DIRECTION, "direction"],
              [i.Msg.SENSING_OF_COSTUMENUMBER, "costume #"],
              [i.Msg.SENSING_OF_COSTUMENAME, "costume name"],
              [i.Msg.SENSING_OF_SIZE, "size"],
              [i.Msg.SENSING_OF_VOLUME, "volume"],
              [i.Msg.SENSING_OF_BACKDROPNUMBER, "backdrop #"],
              [i.Msg.SENSING_OF_BACKDROPNAME, "backdrop name"]
            ]
          }, {
            type: "input_value",
            name: "OBJECT"
          }],
          output: !0,
          category: i.Categories.sensing,
          outputShape: i.OUTPUT_SHAPE_ROUND,
          extensions: ["colours_sensing"]
        })
      }
    }, i.Blocks.sensing_current = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_CURRENT,
          args0: [{
            type: "field_dropdown",
            name: "CURRENTMENU",
            options: [
              [i.Msg.SENSING_CURRENT_YEAR, "YEAR"],
              [i.Msg.SENSING_CURRENT_MONTH, "MONTH"],
              [i.Msg.SENSING_CURRENT_DATE, "DATE"],
              [i.Msg.SENSING_CURRENT_DAYOFWEEK, "DAYOFWEEK"],
              [i.Msg.SENSING_CURRENT_HOUR, "HOUR"],
              [i.Msg.SENSING_CURRENT_MINUTE, "MINUTE"],
              [i.Msg.SENSING_CURRENT_SECOND, "SECOND"]
            ]
          }],
          category: i.Categories.sensing,
          checkboxInFlyout: !0,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_dayssince2000 = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_DAYSSINCE2000,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_username = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_USERNAME,
          category: i.Categories.sensing,
          checkboxInFlyout: !0,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sensing_userid = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SENSING_USERID,
          category: i.Categories.sensing,
          extensions: ["colours_sensing", "output_number"]
        })
      }
    }, i.Blocks.sound = {}, i.Blocks.sound_sounds_menu = {
      init: function() {
        this.jsonInit({
          message0: "%1",
          args0: [{
            type: "field_dropdown",
            name: "SOUND_MENU",
            options: [
              ["1", "0"],
              ["2", "1"],
              ["3", "2"],
              ["4", "3"],
              ["5", "4"],
              ["6", "5"],
              ["7", "6"],
              ["8", "7"],
              ["9", "8"],
              ["10", "9"],
              ["call a function", function() {
                window.alert("function called!")
              }]
            ]
          }],
          colour: i.Colours.sounds.secondary,
          colourSecondary: i.Colours.sounds.secondary,
          colourTertiary: i.Colours.sounds.tertiary,
          extensions: ["output_string"]
        })
      }
    }, i.Blocks.sound_play = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_PLAY,
          args0: [{
            type: "input_value",
            name: "SOUND_MENU"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_playuntildone = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_PLAYUNTILDONE,
          args0: [{
            type: "input_value",
            name: "SOUND_MENU"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_stopallsounds = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_STOPALLSOUNDS,
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_seteffectto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_SETEFFECTO,
          args0: [{
            type: "field_dropdown",
            name: "EFFECT",
            options: [
              [i.Msg.SOUND_EFFECTS_PITCH, "PITCH"],
              [i.Msg.SOUND_EFFECTS_PAN, "PAN"]
            ]
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_changeeffectby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_CHANGEEFFECTBY,
          args0: [{
            type: "field_dropdown",
            name: "EFFECT",
            options: [
              [i.Msg.SOUND_EFFECTS_PITCH, "PITCH"],
              [i.Msg.SOUND_EFFECTS_PAN, "PAN"]
            ]
          }, {
            type: "input_value",
            name: "VALUE"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_cleareffects = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_CLEAREFFECTS,
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_changevolumeby = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_CHANGEVOLUMEBY,
          args0: [{
            type: "input_value",
            name: "VOLUME"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_setvolumeto = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_SETVOLUMETO,
          args0: [{
            type: "input_value",
            name: "VOLUME"
          }],
          category: i.Categories.sound,
          extensions: ["colours_sounds", "shape_statement"]
        })
      }
    }, i.Blocks.sound_volume = {
      init: function() {
        this.jsonInit({
          message0: i.Msg.SOUND_VOLUME,
          category: i.Categories.sound,
          checkboxInFlyout: !0,
          extensions: ["colours_sounds", "output_number"]
        })
      }
    }, e.exports = i
  }